<template>
    <van-nav-bar :title="props.title" :fixed="true" v-if="isShow" />
    <van-nav-bar :title="props.title" :fixed="true" v-else left-text="" left-arrow @click-left="onClickLeft" />
    <div style="height: 4rem;"></div>
</template>

<script setup>
import { ref } from "vue"

let isShow = ref(true)

const props = defineProps(['title'])

const onClickLeft = () => history.back();

if (props.title == "首页" || props.title == "分类" || props.title == "购物车" || props.title == "我的") {
    isShow.value = true
} else {
    isShow.value = false
}

</script>

<style lang="scss" scoped></style>